/*
 * Cria um novo form CadastrarAtividadeIG
 */
package amanda_gabriel_isabella_lucivania_monica.View;

import amanda_gabriel_isabella_lucivania_monica.Model.Dao.DaoBaseImpl;
import amanda_gabriel_isabella_lucivania_monica.Model.Pojo.Atividade;
import amanda_gabriel_isabella_lucivania_monica.Model.Pojo.Turma;

/**
 * Interface gráfica de cadastrar atividade
 *
 * @author isabella
 */
public class CadastrarAtividadeIG extends javax.swing.JFrame {

    /**
     * Construtor
     *
     * @param DaoBase
     */
    private DaoBaseImpl daoBaseImpl;

    public CadastrarAtividadeIG(DaoBaseImpl daoBaseImpl) {
        this.daoBaseImpl = daoBaseImpl;
        //jCTurma.setSelectedIndex(-1);
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        jDSucesso = new javax.swing.JDialog();
        jLCadastroSucesso = new javax.swing.JLabel();
        jLPergunta = new javax.swing.JLabel();
        jBSim = new javax.swing.JButton();
        jBNao = new javax.swing.JButton();
        amanda_gabriel_isabella_lucivania_monicaPUEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("amanda_gabriel_isabella_lucivania_monicaPU").createEntityManager();
        turmaQuery = java.beans.Beans.isDesignTime() ? null : amanda_gabriel_isabella_lucivania_monicaPUEntityManager.createQuery("SELECT t FROM Turma t");
        turmaList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : turmaQuery.getResultList();
        jDCampoVazio = new javax.swing.JDialog();
        jBOk = new javax.swing.JButton();
        jLMsgCampoVazio = new javax.swing.JLabel();
        turmaQuery1 = java.beans.Beans.isDesignTime() ? null : amanda_gabriel_isabella_lucivania_monicaPUEntityManager.createQuery("SELECT t FROM Turma t");
        turmaList1 = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : turmaQuery1.getResultList();
        turmaQuery2 = java.beans.Beans.isDesignTime() ? null : amanda_gabriel_isabella_lucivania_monicaPUEntityManager.createQuery("SELECT t FROM Turma t");
        turmaList2 = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : turmaQuery2.getResultList();
        jPAtividade = new javax.swing.JPanel();
        jLNome = new java.awt.Label();
        jTNome = new javax.swing.JTextField();
        jLTipo = new java.awt.Label();
        jTTipo = new javax.swing.JTextField();
        jLData = new javax.swing.JLabel();
        jTDataDia = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jTDataMes = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jTDataAno = new javax.swing.JTextField();
        jLValor = new javax.swing.JLabel();
        jTValor = new javax.swing.JTextField();
        jLPontos = new javax.swing.JLabel();
        jLTurma = new javax.swing.JLabel();
        jCTurma = new javax.swing.JComboBox();
        jBCancelar = new javax.swing.JButton();
        jBCadastrar = new javax.swing.JButton();

        jDSucesso.setTitle("Confirmação");
        jDSucesso.setFont(new java.awt.Font("Ubuntu", 0, 15)); // NOI18N
        jDSucesso.setMinimumSize(new java.awt.Dimension(400, 175));

        jLCadastroSucesso.setText("Atividade cadastrada com sucesso!");

        jLPergunta.setText("Deseja realizar outro cadastro?");

        jBSim.setText("Sim");
        jBSim.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBSimActionPerformed(evt);
            }
        });

        jBNao.setText("Não");
        jBNao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBNaoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jDSucessoLayout = new javax.swing.GroupLayout(jDSucesso.getContentPane());
        jDSucesso.getContentPane().setLayout(jDSucessoLayout);
        jDSucessoLayout.setHorizontalGroup(
            jDSucessoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jDSucessoLayout.createSequentialGroup()
                .addGroup(jDSucessoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jDSucessoLayout.createSequentialGroup()
                        .addGap(45, 45, 45)
                        .addGroup(jDSucessoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLPergunta)
                            .addGroup(jDSucessoLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(jBSim, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(27, 27, 27)
                                .addComponent(jBNao, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jDSucessoLayout.createSequentialGroup()
                        .addGap(33, 33, 33)
                        .addComponent(jLCadastroSucesso)))
                .addContainerGap(34, Short.MAX_VALUE))
        );
        jDSucessoLayout.setVerticalGroup(
            jDSucessoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jDSucessoLayout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addComponent(jLCadastroSucesso)
                .addGap(18, 18, 18)
                .addComponent(jLPergunta)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jDSucessoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBSim)
                    .addComponent(jBNao))
                .addContainerGap(30, Short.MAX_VALUE))
        );

        jDCampoVazio.setTitle("ATENÇÃO");
        jDCampoVazio.setMinimumSize(new java.awt.Dimension(400, 175));

        jBOk.setText("OK");
        jBOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBOkActionPerformed(evt);
            }
        });

        jLMsgCampoVazio.setText("Todos os campos devem ser preenchidos!");
        jLMsgCampoVazio.setMinimumSize(new java.awt.Dimension(400, 175));

        javax.swing.GroupLayout jDCampoVazioLayout = new javax.swing.GroupLayout(jDCampoVazio.getContentPane());
        jDCampoVazio.getContentPane().setLayout(jDCampoVazioLayout);
        jDCampoVazioLayout.setHorizontalGroup(
            jDCampoVazioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jDCampoVazioLayout.createSequentialGroup()
                .addGap(38, 38, 38)
                .addGroup(jDCampoVazioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLMsgCampoVazio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBOk, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(44, Short.MAX_VALUE))
        );
        jDCampoVazioLayout.setVerticalGroup(
            jDCampoVazioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jDCampoVazioLayout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addComponent(jLMsgCampoVazio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(28, 28, 28)
                .addComponent(jBOk)
                .addContainerGap(26, Short.MAX_VALUE))
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Cadastro de Atividade");
        setMinimumSize(new java.awt.Dimension(400, 176));

        jPAtividade.setBorder(javax.swing.BorderFactory.createTitledBorder("Por favor, insira os dados abaixo:"));
        jPAtividade.setName("Por favor, insira os dados abaixo:"); // NOI18N

        jLNome.setFont(new java.awt.Font("Ubuntu", 0, 15)); // NOI18N
        jLNome.setForeground(new java.awt.Color(76, 76, 76));
        jLNome.setText("Nome:");

        jTNome.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTNomeActionPerformed(evt);
            }
        });

        jLTipo.setFont(new java.awt.Font("Ubuntu", 0, 15)); // NOI18N
        jLTipo.setForeground(new java.awt.Color(76, 76, 76));
        jLTipo.setText("Tipo:");

        jTTipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTTipoActionPerformed(evt);
            }
        });

        jLData.setText("Data:");

        jTDataDia.setForeground(new java.awt.Color(76, 76, 76));
        jTDataDia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTDataDiaActionPerformed(evt);
            }
        });

        jLabel2.setText("/");

        jTDataMes.setForeground(new java.awt.Color(76, 76, 76));
        jTDataMes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTDataMesActionPerformed(evt);
            }
        });

        jLabel3.setText("/");

        jTDataAno.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTDataAnoActionPerformed(evt);
            }
        });

        jLValor.setText("Valor:");

        jTValor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTValorActionPerformed(evt);
            }
        });

        jLPontos.setText("pontos");

        jLTurma.setText("Turma:");

        org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, turmaList2, jCTurma);
        bindingGroup.addBinding(jComboBoxBinding);

        jCTurma.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCTurmaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPAtividadeLayout = new javax.swing.GroupLayout(jPAtividade);
        jPAtividade.setLayout(jPAtividadeLayout);
        jPAtividadeLayout.setHorizontalGroup(
            jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPAtividadeLayout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPAtividadeLayout.createSequentialGroup()
                        .addComponent(jLTurma)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jCTurma, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPAtividadeLayout.createSequentialGroup()
                        .addComponent(jLNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTNome, javax.swing.GroupLayout.PREFERRED_SIZE, 255, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPAtividadeLayout.createSequentialGroup()
                        .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLValor)
                            .addComponent(jLData)
                            .addComponent(jLTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPAtividadeLayout.createSequentialGroup()
                                .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(jPAtividadeLayout.createSequentialGroup()
                                        .addGap(3, 3, 3)
                                        .addComponent(jTDataDia, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(5, 5, 5)
                                        .addComponent(jLabel2))
                                    .addComponent(jTValor, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPAtividadeLayout.createSequentialGroup()
                                        .addGap(6, 6, 6)
                                        .addComponent(jTDataMes, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel3)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jTDataAno, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPAtividadeLayout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLPontos)))
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPAtividadeLayout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(jTTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPAtividadeLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jTDataAno, jTDataDia, jTDataMes});

        jPAtividadeLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jCTurma, jTNome, jTTipo});

        jPAtividadeLayout.setVerticalGroup(
            jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPAtividadeLayout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCTurma)
                    .addComponent(jLTurma))
                .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPAtividadeLayout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addComponent(jLNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPAtividadeLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTNome)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPAtividadeLayout.createSequentialGroup()
                        .addComponent(jLData)
                        .addGap(49, 49, 49))
                    .addGroup(jPAtividadeLayout.createSequentialGroup()
                        .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(jTDataDia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTDataMes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)
                            .addComponent(jTDataAno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTValor, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLPontos)
                            .addComponent(jLValor))))
                .addContainerGap())
        );

        jPAtividadeLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jTDataAno, jTDataDia, jTDataMes});

        jBCancelar.setText("Cancelar");
        jBCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCancelarActionPerformed(evt);
            }
        });

        jBCadastrar.setText("Cadastrar");
        jBCadastrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCadastrarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jBCadastrar)
                        .addGap(12, 12, 12)
                        .addComponent(jBCancelar))
                    .addComponent(jPAtividade, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jBCadastrar, jBCancelar});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(jPAtividade, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBCadastrar)
                    .addComponent(jBCancelar))
                .addGap(25, 25, 25))
        );

        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jBCadastrar, jBCancelar});

        getAccessibleContext().setAccessibleDescription("");

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTTipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTTipoActionPerformed
        // TODO add your handling code here:    
    }//GEN-LAST:event_jTTipoActionPerformed

    private void jBCadastrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCadastrarActionPerformed

        Turma turma = (Turma) jCTurma.getSelectedItem();
        String nome = jTNome.getText();
        String tipo = jTTipo.getText();
        String dia = jTDataDia.getText();
        String mes = jTDataMes.getText();
        String ano = jTDataAno.getText();
        String data = dia + "/" + mes + "/" + ano;
        String stringValor = jTValor.getText();

        int index = jCTurma.getSelectedIndex();

        if (nome.equals("") || tipo.equals("") || dia.equals("") || mes.equals("") || ano.equals("") || stringValor.equals("") || index == -1) {
            setVisible(false);
            jDCampoVazio.setVisible(true);
            jDCampoVazio.setLocation(360, 240);
        } else {
            double valor = Double.parseDouble(jTValor.getText());
            Atividade atividade = new Atividade(turma, nome, tipo, data, valor);
            daoBaseImpl.create(atividade);

            jTNome.setText("");
            jTTipo.setText("");
            jTDataDia.setText("");
            jTDataMes.setText("");
            jTDataAno.setText("");
            jTValor.setText("");
            jCTurma.setSelectedIndex(-1);
            setVisible(false);
            jDSucesso.setVisible(true);
            jDSucesso.setLocation(360, 240);
        }

    }//GEN-LAST:event_jBCadastrarActionPerformed

    private void jBCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCancelarActionPerformed
        setVisible(false);
    }//GEN-LAST:event_jBCancelarActionPerformed

    private void jTNomeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTNomeActionPerformed
    }//GEN-LAST:event_jTNomeActionPerformed

    private void jTValorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTValorActionPerformed
    }//GEN-LAST:event_jTValorActionPerformed

    private void jTDataDiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTDataDiaActionPerformed
    }//GEN-LAST:event_jTDataDiaActionPerformed

    private void jTDataMesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTDataMesActionPerformed
    }//GEN-LAST:event_jTDataMesActionPerformed

    private void jTDataAnoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTDataAnoActionPerformed
    }//GEN-LAST:event_jTDataAnoActionPerformed

    private void jCTurmaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCTurmaActionPerformed
    }//GEN-LAST:event_jCTurmaActionPerformed

    private void jBSimActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBSimActionPerformed
        setVisible(true);
        jDSucesso.dispose();
    }//GEN-LAST:event_jBSimActionPerformed

    private void jBNaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBNaoActionPerformed
        setVisible(false);
        jDSucesso.dispose();
    }//GEN-LAST:event_jBNaoActionPerformed

private void jBOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBOkActionPerformed
    setVisible(true);
    jDCampoVazio.dispose();
}//GEN-LAST:event_jBOkActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.persistence.EntityManager amanda_gabriel_isabella_lucivania_monicaPUEntityManager;
    private javax.swing.JButton jBCadastrar;
    private javax.swing.JButton jBCancelar;
    private javax.swing.JButton jBNao;
    private javax.swing.JButton jBOk;
    private javax.swing.JButton jBSim;
    private javax.swing.JComboBox jCTurma;
    private javax.swing.JDialog jDCampoVazio;
    private javax.swing.JDialog jDSucesso;
    private javax.swing.JLabel jLCadastroSucesso;
    private javax.swing.JLabel jLData;
    private javax.swing.JLabel jLMsgCampoVazio;
    private java.awt.Label jLNome;
    private javax.swing.JLabel jLPergunta;
    private javax.swing.JLabel jLPontos;
    private java.awt.Label jLTipo;
    private javax.swing.JLabel jLTurma;
    private javax.swing.JLabel jLValor;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPAtividade;
    private javax.swing.JTextField jTDataAno;
    private javax.swing.JTextField jTDataDia;
    private javax.swing.JTextField jTDataMes;
    private javax.swing.JTextField jTNome;
    private javax.swing.JTextField jTTipo;
    private javax.swing.JTextField jTValor;
    private java.util.List<amanda_gabriel_isabella_lucivania_monica.Model.Pojo.Turma> turmaList;
    private java.util.List<amanda_gabriel_isabella_lucivania_monica.Model.Pojo.Turma> turmaList1;
    private java.util.List<amanda_gabriel_isabella_lucivania_monica.Model.Pojo.Turma> turmaList2;
    private javax.persistence.Query turmaQuery;
    private javax.persistence.Query turmaQuery1;
    private javax.persistence.Query turmaQuery2;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables
}
